import {Space} from 'antd';
import {QuestionCircleOutlined} from '@ant-design/icons';
import React from 'react';
import Avatar from './AvatarDropdown';
import HeaderSearch from '../HeaderSearch';
import './index.less';
import NoticeIconView from '../NoticeIcon';

export type SiderTheme = 'light' | 'dark';

const GlobalHeaderRight: React.FC = () => {
    // const { initialState } = useModel('@@initialState');
    //
    // if (!initialState || !initialState.settings) {
    //   return null;
    // }

    // const { navTheme, layout } = initialState.settings;
    let className = "dark right";

    // if ((navTheme === 'dark' && layout === 'top') || layout === 'mix') {
    //   className = `${styles.right}  ${styles.dark}`;
    // }

    return (
        <Space className={className}>
            <HeaderSearch
                className="anticon search "
                placeholder="站内搜索"
                defaultValue="umi ui"
                options={[]} // onSearch={value => {
                //   console.log('input', value);
                // }}
            />
            <span
                className="anticon"
                onClick={() => {
                    window.open('https://pro.ant.design/docs/getting-started');
                }}
            >
        <QuestionCircleOutlined/>
      </span>
            <NoticeIconView/>
            <Avatar menu/>
        </Space>
    );
};

export default GlobalHeaderRight;
